<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>主页</title>
    <script src="../assets/js/vue.min.js"></script>
    <script src="../assets/js/axios.min.js"></script>
    <script src="../assets/js/param.js"></script>
    <!-- 引入 Element UI 样式 -->
    <link rel="stylesheet" href="https://unpkg.com/element-ui/lib/theme-chalk/index.css">
    <!-- 引入 Element UI -->
    <script src="https://unpkg.com/element-ui/lib/index.js"></script>

    <link rel="stylesheet" href="../assets/css/index.css">
</head>
<body>
    <div id="app">
        <!-- <svg @click="sidebar(1)" class="sidebar_open" t="1734073984990" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="7820" width="45" height="45"><path d="M219.428571 765.830095v73.142857H121.904762v-73.142857h97.523809z m682.666667 0v73.142857H268.190476v-73.142857h633.904762zM219.428571 490.496v73.142857H121.904762v-73.142857h97.523809z m682.666667 0v73.142857H268.190476v-73.142857h633.904762zM219.428571 215.137524v73.142857H121.904762v-73.142857h97.523809z m682.666667 0v73.142857H268.190476v-73.142857h633.904762z" p-id="7821"></path></svg> -->
        <div class="sidebar">
            <!-- <svg @click="sidebar(0)" class="sidebar_close" t="1734174999026" class="icon" viewBox="0 0 1102 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="9613" id="mx_n_1734174999027" width="15" height="15"><path d="M701.597538 511.842462l366.119385-366.119385a57.974154 57.974154 0 0 0 0-82.077539l-41.038769-41.038769a57.974154 57.974154 0 0 0-82.077539 0L578.481231 388.726154 212.283077 22.528a57.974154 57.974154 0 0 0-82.077539 0l-41.117538 41.117538a57.974154 57.974154 0 0 0 0 82.077539l366.119385 366.119385-366.119385 366.119384a58.131692 58.131692 0 0 0 0 82.156308l41.038769 41.038769a57.974154 57.974154 0 0 0 82.077539 0l366.119384-366.119385 366.119385 366.119385a57.974154 57.974154 0 0 0 82.077538 0l41.03877-41.038769a58.131692 58.131692 0 0 0 0-82.156308L701.597538 511.842462z" fill="#e6e6e6" p-id="9614"></path></svg> -->
            <div class="user">
                <img :src="[this.userprofile]" alt="" class="profile">
                <p class="nickname">{{this.usernickname}}</p>
            </div>
            <div class="nav_list">
                <!-- 管理员功能 -->
                <div class="nav_item" v-if="identity == 0" @click="panelchange(1)">
                    <svg t="1734173680891" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="7948" id="mx_n_1734173680891" width="30" height="30"><path d="M632.246857 121.904762c130.56 0 236.422095 105.837714 236.422095 236.422095 0 82.895238-42.666667 155.794286-107.203047 198.022095l192.853333 225.01181A73.142857 73.142857 0 0 1 898.779429 902.095238l-116.443429 0.024381c12.824381-22.186667 16.335238-48.566857 9.99619-73.142857L898.779429 828.952381 651.702857 540.696381l69.705143-45.568a163.279238 163.279238 0 0 0-86.381714-300.056381 287.158857 287.158857 0 0 0-63.341715-65.340952A236.544 236.544 0 0 1 632.246857 121.904762z m-69.90019 471.722667l160.914285 187.733333A73.142857 73.142857 0 0 1 667.672381 902.095238H134.656a73.142857 73.142857 0 0 1-55.53981-120.734476l160.914286-187.733333a283.867429 283.867429 0 0 0 161.158095 49.883428c59.806476 0 115.321905-18.407619 161.158096-49.883428zM401.188571 121.904762c130.56 0 236.422095 105.837714 236.422096 236.422095 0 130.56-105.862095 236.422095-236.422096 236.422095-130.584381 0-236.422095-105.862095-236.422095-236.422095C164.766476 227.742476 270.60419 121.904762 401.188571 121.904762z" p-id="7949" fill="#e6e6e6"></path></svg>
                    <p>发送广播</p>
                    <div class="hover"></div>
                </div>
                <div class="nav_item" v-if="identity == 0" @click="panelchange(2)">
                    <svg t="1734173893750" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="8103" width="30" height="30"><path d="M669.013333 596.21181l194.389334 226.791619A77.433905 77.433905 0 0 1 804.59581 950.857143H212.016762a77.433905 77.433905 0 0 1-58.782476-127.853714l194.413714-226.791619a308.345905 308.345905 0 0 0 160.670476 44.860952c58.831238 0 113.834667-16.384 160.670476-44.860952zM508.294095 73.142857c142.57981 0 258.145524 115.565714 258.145524 258.145524 0 142.57981-115.565714 258.145524-258.145524 258.145524-142.57981 0-258.145524-115.565714-258.145524-258.145524C250.148571 188.732952 365.714286 73.142857 508.318476 73.142857z" p-id="8104" fill="#e6e6e6"></path></svg>
                    <p>用户管理</p>
                    <div class="hover"></div>
                </div>
            </div>
            <div class="logout nav_item" @click="logout()">
                <svg t="1734314108493" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="2902" id="mx_n_1734314108493" width="30" height="30"><path d="M835.669333 554.666667h-473.173333A42.453333 42.453333 0 0 1 320 512a42.666667 42.666667 0 0 1 42.474667-42.666667h473.173333l-161.813333-161.834666a42.666667 42.666667 0 0 1 60.330666-60.330667l234.666667 234.666667a42.666667 42.666667 0 0 1 0 60.330666l-234.666667 234.666667a42.666667 42.666667 0 0 1-60.330666-60.330667L835.669333 554.666667zM554.666667 42.666667a42.666667 42.666667 0 1 1 0 85.333333H149.525333C137.578667 128 128 137.578667 128 149.482667v725.034666C128 886.4 137.6 896 149.525333 896H554.666667a42.666667 42.666667 0 1 1 0 85.333333H149.525333A106.816 106.816 0 0 1 42.666667 874.517333V149.482667A106.773333 106.773333 0 0 1 149.525333 42.666667H554.666667z" fill="#e6e6e6" p-id="2903"></path></svg>
                <p>退出登录</p>
            </div>
        </div>
        <div class="panel">
            <iframe ref="iframe" title="Inline Frame Example" width="100%" height="100%" :src="[panelsrc]" frameborder="no" border="0" marginwidth="0" marginheight="0"></iframe>
        </div>
    </div>
</body>
<script>
    new Vue({
        el: '#app',
        data: function () {
            return {
                form:{
                    a:'1'
                },
                identity:'',
                userprofile:'',
                usernickname:'',
                hidden:'',
                userid:'',
                panelsrc:'./welcome.html',
                rules: {
                    
                }
            }
        },
        created(){
            this.load()
        },
        methods:{
            load(){
                
            },
            sidebar(value){
                if(value === 1){
                    this.hidden = 'sidebar_no_hidden'
                }
                if(value === 0){
                    this.hidden = ''
                }
            },
            panelchange(value){
                if(value == 1){
                    this.panelsrc = './team_manger.html'
                }
                if(value == 2){
                    this.panelsrc = './user_manger.html'
                }
            },
            logout(){
                window.location.href = './login.html'; 
                // axios.defaults.headers['Accept'] = '*';
                // axios.defaults.headers['Content-Type'] = 'application/x-www-form-urlencoded';
                // axios.post("http://localhost:8080/task_war_exploded/user/logout",this.form)
                // .then((res) => {
                    
                // })
                // .catch((error) => {
                //     alert("服务器内部错误，请稍后再试");
                // });
            }
        }
    })
</script>
</html>